package cn.com.demo.microservice.anquan.controller;

import cn.com.demo.microservice.anquan.service.IUserService;
import cn.com.demo.microservice.entity.AqUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private IUserService userService;
    @PostMapping("/add")
    public int addUser(@RequestBody AqUser user){
        int urId = -1;
        urId = this.userService.addUser(user);
        return urId;
    }
}
